package com.sali.b_design_pattern.d_strategy_pattern.lesson_01;

import com.sali.b_design_pattern.d_strategy_pattern.lesson_01.strategy.IPayService;
import com.sali.b_design_pattern.d_strategy_pattern.lesson_01.strategy.impl.AliPayService;
import com.sali.b_design_pattern.d_strategy_pattern.lesson_01.strategy.impl.BankPayService;
import com.sali.b_design_pattern.d_strategy_pattern.lesson_01.strategy.impl.WeixinPayService;

/**
 * @description:
 * @date: 2023/3/26 13:22.
 * @version: 1.0
 */
public class Lesson01Starter {

    public static void main(String[] args) {
        IPayService aliPayService = new AliPayService();
        System.out.println(aliPayService.getPayName());
        aliPayService.payCourse(1L);
        aliPayService.payNews(1L);
        aliPayService.payVip(1);

        IPayService bankPayService = new BankPayService();
        System.out.println(bankPayService.getPayName());
        aliPayService.payCourse(2L);
        aliPayService.payNews(2L);
        aliPayService.payVip(2);

        IPayService weixinPayService = new WeixinPayService();
        System.out.println(weixinPayService.getPayName());
        aliPayService.payCourse(3L);
        aliPayService.payNews(3L);
        aliPayService.payVip(3);
    }

}
